#ifndef HOMEPAGE_H
#define HOMEPAGE_H
#include <QString>
#include <QWidget>
#include <QBarSet>
#include <QVector>
#include <QChart>
#include <QChartView>
#include <QBarSeries>
#include <QHBoxLayout>
#include <QBarCategoryAxis>
QT_CHARTS_USE_NAMESPACE //QBar 柱状图前置

namespace Ui {
class HomePage;
}

class HomePage : public QWidget
{
    Q_OBJECT

public:
    explicit HomePage(QWidget *parent = 0);
    ~HomePage();

private:
    Ui::HomePage *ui;
    QVector<QBarSet*> datas;
    QHBoxLayout *box;
    QChart *chart;
    QChartView *chartView;
    QBarSeries *series;
    QBarCategoryAxis *axis;
    int count;
    void showBar();
    void getXAxis();
signals:
    void toPage(QString page);
    void destory();
private slots:

    void on_updateButton_clicked();
};

#endif // HOMEPAGE_H
